package com.morristaedt.mirror.modules.voice.handler;


import com.morristaedt.mirror.bean.SemanticResult;

/**
 * Created by PR on 2018/3/22.
 */

public class NotificationHandler extends Handler {
    public NotificationHandler(SemanticResult result) {
        super(result);
    }

    @Override
    public String getFormatContent() {
        StringBuilder answer = new StringBuilder(result.answer);

        if(result.data.has("appid")) {
            answer.append(NEWLINE);
            answer.append(NEWLINE);
            answer.append("<a href=\"use\">马上体验一下</a>");

            return answer.toString().replaceAll("\n", NEWLINE);
        }

        return answer.toString();
    }

}
